The NetCfg utility provides access to the Windows
Pre-installation Environment (WinPE). Using this deployment environment
can save you considerable time and effort as described at http://ww.microsoft.com/licensing/sa/benefits/winpe.mspx. Learn more about WinPE at http://www.microsoft.com/technet/windowsvista/deploy/winpe.mspx. This utility uses the following syntax:
netcfg [-v] [-e] [-winpe] [-l <full-path-to-component-INF>]
-c {p | s | c} -i <comp-id>
netcfg [-v] -winpe
netcfg [-v] -q <comp-id>
netcfg [-v] [-e] -u <comp-id>
netcfg [-v] -s {a | n}
netcfg [-v] -b <comp-id>
The following list describes each of the command line arguments.
You must pass the
arguments in the order shown in the syntax or the command may fail. It's
always a good idea to use the order shown in the syntax examples, but
when using the NetCfg utility the order is essential.
|
|
-v
Displays verbose
information about the specified task. The amount and type of information
depends on the command that you're executing.
-e
Uses servicing environment variables during package installation and uninstallation.
-winpe
Installs the TCP/IP, NetBIOS, and Microsoft Client for Windows pre-installation environment. To use this feature, type NetCfg -v -winpe
and press Enter. Even though the verbose command line switch is
optional, you'll want it in this case to see precisely how the
installation proceeds. In addition, make sure you have signed drivers
for all of the installation features or you'll see a list of error
messages as the system tries to perform the install.
-l
Full-Path-To-Component-INF
Specifies the
location of the INF file that contains the package installation
instructions. To install a driver or product that relies on an INF file,
type NetCfgMyProd.INF (where MyProd is the filename of the INF file) and press Enter.
-c {p | s | c}
Defines the class of the package you want to install: protocol, service, or client.
-i
CompID
Installs the specified package. Use the -s command line switch to obtain a list of component identifiers. For example, if you type NetCfg -c p -i ms_netbt
and press Enter, you would install the WINS Client(TCP/IP) Protocol.
Notice that you must specify the type of package you want to install
using the -c command line switch. In this case, you're installing a protocol, so you use the p value.
-q
CompID
Queries the installation status of the specified package. Use the -sn command line switch to obtain a list of component identifiers. For example, if you type NetCfg -v -q ms_msclient and press Enter, you obtain the installation status of the Client for Microsoft Networks.
-u
CompID
Uninstalls the specified package. Use the -s command line switch to obtain a list of component identifiers. For example, if you type NetCfg -u ms_netbt and press Enter, you would uninstall the WINS Client(TCP/IP) Protocol.
-s {a | n}
Displays the specified component types where a is adapters and n is network components. For example, if you type NetCfg -sa and press Enter, you may see a list of adapters, as shown in Figure 1.
-b
CompID
Shows the binding paths for the specified component. Use the -sn
command line switch to obtain a list of component identifiers. When you
see the output, it will contain a number of adapter identifiers such as
pci\ven_8086&dev_1096. Use the -sa command line switch to determine which adapters appear in the list.